1. Field of the Invention
The present invention relates to an image pickup apparatus, particularly an image pickup apparatus having a function of estimating the type of a light source when an input image is picked up, a method of estimating a light source, and a program for making a computer execute the method.
2. Description of Related Art
Human eyes have a function called chromatic adaptation of recognizing a white object to be white even if a light source changes. With this function, human beings can recognize a white object to be white although a spectral distribution of a light source changes with a sun altitude. Similarly, even under a fluorescent lamp having quite a different spectral distribution from that of sun light, a white object can be recognized as white because of the chromatic adaptation function. This function to be realized in an apparatus is a “white balance function”.
Even if a white object can be seen as white with the white balance function, color actually seen cannot be reproduced in some cases because of the influences of an “image sensor spectral sensitivity” and a “human eye spectral sensitivity”. A “color reproduction function” is prepared as a function of correcting color reproduction. Since parameters of the “white balance function” and “color reproduction function” are expressed by matrices, respectively, one process by one matrix is mounted at some actual stages.
In order to realize the white balance function, a comprehensive control algorithm has been used generally which adopts the Evans principle (gray world assumption) as the base in combination with black body radiation locus information. The Evans principle is an assumption that colors of objects in the world added together are achromatic. The black body radiation locus is a locus of color changing from red copper, red, orange, yellow, green and blue, to be irradiated when a perfect black body is heated. Generally the black body radiation locus is used as the criterion when color information of natural light is processed, because the natural light rides on this black body radiation locus.
However, the Evans principle may not be satisfied under a condition that even if all effective pixels in a screen are integrated, color is not achromatic, such as a scene whose whole screen shows the sky and a scene surrounded by trees. For example, if the scene whose whole screen shows the sky is controlled on the assumption that the Evans principle is satisfied, a color failure occurs in which blue of the sky becomes achromatic (gray) and clouds become yellowish. In order to avoid this, in an actual camera control, it has been proposed that only pixel values presumed achromatic are selectively extracted from effective pixels in the screen and integrated to obtain an evaluation value to be used for white balance control (for example, refer to FIG. 1 in Japanese Patent Application Publication No. HEI-3-16494).
A method of improving a precision of white balance control and color reproduction control has also been proposed in which an image picked up with an image sensor in a camera is used to synthetically evaluate brightness information, an integrated value of pixel values presumed achromatic, an integrated value of the whole screen to estimate the light source (for example, refer to FIG. 1 in Japanese Patent Application Publication No. 2000-224608).